import React from "react";
import { Navigate } from "react-router-dom";
import AdminHome from "../components/superAdmin/adminHome"; // 超级管理员主页
import Visualization from "../pages/visualization"; // 可视化页面
import UserManagement from "../components/superAdmin/UserManagement/usermanagement"; // 用户管理主页面
import AllUser from "../components/superAdmin/UserManagement/allUser"; // 所有用户
import Recruiter from "../components/superAdmin/UserManagement/recruier"; // 招聘方用户
import JobSeeker from "../components/superAdmin/UserManagement/jobSeeker"; // 求职者用户
import PersonalCenter from "../components/personalCenter/profile";

export const adminRoutes = [
  {
    path: "/admin",
    element: <AdminHome />, // 超级管理员主页面
    children: [
      { path: "visualization", element: <Visualization /> }, // 可视化页面
      {
        path: "usermanagement",
        element: <UserManagement />, // 用户管理主页面
        children: [
          { index: true, element: <Navigate to="sysalluser" /> },
          { path: "sysalluser", element: <AllUser /> },
          { path: "sysrecruiter", element: <Recruiter /> },
          { path: "sysjobseeker", element: <JobSeeker /> },
        ],
      },
      { path: "personalcenter", element: <PersonalCenter /> },
    ],
  },
];
